<include file="Public:html" />

<title>注册认证</title>

<link type="text/css" rel="stylesheet" media="screen" href="../Public/css/register.css" /> 


<script type="text/javascript"> 

	$(document).ready(function(){
	    $.formValidator.initConfig({
	        formid:"actmemberform",
	        validatorgroup:"4",
	        autotip:true
	    });
	  
	    $("#userNickname").formValidator({
	        validatorgroup:"4",
	        onshow:"请输入您的昵称",
	        onfocus:"昵称长度4到10位,不可修改",
	        oncorrect:"恭喜你,您可以用这个昵称"
	    }).inputValidator({
	        min:4,
	        max:10,
	        onerror:"昵称的长度不对"
	    }).ajaxValidator({
	        type : "GET",
	        datatype : "json",
	        url : APP+"/User/peraddnicknamecheck/",
	        success : function(data){
	            if(data=="1"){return true;}else{return false;}
	        },
	        error: function(){alert("可能服务器忙，请重试");},
	        onerror : "该昵称不可用，请更换",
	        empty:{leftempty:false,rightempty:false,emptyerror:"该昵称不可用，请更换"},
	        onwait : "进行合法性校验，请稍候..."
	    });
	 
	    $("#userPassword").formValidator({
	        validatorgroup:"4",
	        onshow:"请输入密码",
	        onfocus:"密码最少7位且不能全为数字",
	        oncorrect:"密码合法"
	    }).inputValidator({
	        min:7,
	        empty:{leftempty:false,rightempty:false,emptyerror:"密码两边不能有空符号"},
	        onerror:"密码最少7位,请确认"
	    }).regexValidator({
	        regexp:"^(?!\\d*$)",
	        onerror:"密码不能全数字,请检查"
	    });
	    $("#userPasswordRepeat").formValidator({
	        validatorgroup:"4",
	        onshow:"请输入重复密码",
	        onfocus:"两次密码必须一致哦",
	        oncorrect:"密码一致"
	    }).inputValidator({
	        min:7,
	        empty:{leftempty:false,rightempty:false,emptyerror:"重复密码两边不能有空符号"},
	        onerror:"密码最少7位,请确认"
	    }).compareValidator({
	        desid:"userPassword",
	        operateor:"=",
	        onerror:"2次密码不一致,请确认"
	    });
	 
	    $("#realname").formValidator({
	        validatorgroup:"4",
	        empty:true,
	        tipid:'notetip',
	        onshow:"请输入真实姓名,本项为选填项目",
	        onfocus:"请输入真实姓名,本项为选填项目",
	        oncorrect:" "
	    }).inputValidator({
	        min:4,
	        max:8,
	        empty:{leftempty:false,rightempty:false,emptyerror:"真实姓名两边不能有空符号"},
	        onerror:"真实姓名最少2位,请确认"
	    }).defaultPassed();
	 
	 
	    $("#phoneno").formValidator({
	        validatorgroup:"4",
	        empty:true,
	        tipid:'notetip',
	        onshow:"请输入手机号,本项为选填项目",
	        onfocus:"请输入手机号,本项为选填项目",
	        oncorrect:" "
	    }).inputValidator({
	        min:11,
	        max:11,
	        empty:{leftempty:false,rightempty:false,emptyerror:"您输手机号码有误"},
	        onerror:"请输入正确的手机号"
	    }).regexValidator({
	        regexp:"^(13|15|18|14)\\d{9}$"
	    }).defaultPassed();
	 
	    $("#paibanAgreement").click(function(){
	        //if($("this:checked"))
	        if($("#paibanAgreement").attr('checked'))      {
	            $("#submitButton").removeClass("button-disabled");
	 
	        }else{
	            $("#submitButton").addClass("button-disabled");
	        }
	    });
	 
	    $("#submitButton button").click(function(){
	        if($("#paibanAgreement").attr('checked'))    {
	            actmember();
	        }
	    });
 
	});
 
 
	
	
//激活用户帐号
function actmember() {
    var pass=$.formValidator.pageIsValid('4');
    if(pass){
        var queryString = $('#actmemberform').formSerialize();
        //alert(queryString);
        $.post(APP+"/User/regsetp2", queryString,function(msg){
            //alert(msg);
            if(msg=='0'){ //先保留msg这个值以备以后使用
                showtips('用户账号激活成功,请登陆!','tips',1);
                setTimeout("gotourl('/User/jumper/type/0')", 2000);
            }else if(msg=='1'){
                showtips('用户账号激活不成功!请检查你的信息是否正确','tips',2);
            }else if(msg=='2'){
                showtips('用户账号激活成功,请登陆!','tips',1);
                setTimeout("gotourl('/User/jumper/type/2')", 2000);
            }else{
                //cpa专用页面
                showtips('用户账号激活成功,正在跳转到首页!','tips',1);
                setTimeout("gotourl('/User/jumper/type/1/mb/"+msg+"')", 2000);
            }
        });
    }
}
 
 
</script> 

</head> 
 
 
 
<body> 

 <script type="text/javascript" src="../Public/WdatePicker/WdatePicker.js?1002"></script>
 
 
 
<div id="paiban" class="subpage skin"> 
 
    <!-- #header --> 
    <include file="Public:header" />
    <!-- #header end --> 
    
    
    <!-- #register --> 
    <div id="register" class="page980 mainbody clearfix regWrap"> 
    
	    <empty name="verificationdata">
	
	    <div id="regSuccess">
            <h1>你的参数不正确!</h1>
            <h2>检查后再开始您的非常之旅吧,如有疑问请发邮件到{$Think.config.sysconfig.services_email}与我们联系！</h2>
	    </div>
	    <div style="clear: both; width: 960px; height: 100px;"></div>   
	
	    <else />
	    <div id="regSuccess"> 
            <h1><em>[{$verificationdata.mail}]</em> 验证成功</h1> 
            <h2>请输入您的密码和基本信息，激活您的帐号，开始您的非常之旅吧</h2> 
            <span id="tips"></span> 
	    </div> 
	    
	    
	      <form id="actmemberform" autocomplete="off"> 
	    
	        <div class="container clearfix"> 
	            <div class="content clearfix" style="display:block;"> 
	                <fieldset id="requiredInfo"> 
	                    <legend class="text">必填信息</legend> 
	                    <div class="inputWrap"> 
	                        <label for="userEmail">邮箱:</label> 
	                        <input  class="input" style="width:200px; color:#999;" value="{$verificationdata.mail}" disabled="disabled" /> 
	                        <input  id="userEmail" name="userEmail"   type="hidden" value="{$verificationdata.mail}" > 
	                    </div> 
	                    <div class="inputWrap"> 
	                        <label for="userNickname">昵称:</label> 
	                        <input id="userNickname" name="userNickname" type="text" class="input" style="width:200px;" value="" /> 
	                        <span id="userNicknameTip"></span> 
	                    </div> 
	                    <div class="inputWrap"> 
	                        <label for="userPassword">密码:</label> 
	                        <input id="userPassword" name="userPassword" type="password" class="input" style="width:200px;" /> 
	                        <span id="userPasswordTip"></span> 
	                    </div> 
	                    <div class="inputWrap"> 
	                        <label for="userPasswordRepeat">确认密码:</label> 
	                        <input id="userPasswordRepeat" type="password" class="input" style="width:200px;" /> 
	                        <span id="userPasswordRepeatTip"></span> 
	                    </div> 
	                    <input name="secretsn" id="secretsn" value="{$verificationdata['code']}" type="hidden" /> 
	    
	                    <div id="submitAndReg"> 
	                        <span id="submitButton" class="button button-hilite button-disabled"> 
	                            <span class="first-child"> 
	                                <button type="button"><strong>同意服务协议, 注册</strong></button> 
	                            </span> 
	                        </span> 
	                        <p> 
	                            <input id="paibanAgreement" name="paibanAgreement" class="checkbox" type="checkbox" /> 
	                            <label style="display:inline;" for="paibanAgreement">我已阅读并同意{$Think.config.sysconfig.webname}服务协议</label> 
	                        </p> 
	                    </div> 
	                </fieldset> 
	    
	    
	                <fieldset id="optionalInfo"> 
	                    <legend class="text">选填信息</legend> 
	                    <div id="userIcon" class="clearfix"> 
	                        <label>头像:</label> 
	                        <div id="userIconSelected"> 
	                            <a href="javascript:usericon();"><img id="showicon" src="__PUBLIC__/images/head/b/{$headdata.filename}" /></a> 
	                        </div> 
	                        <div id="selectIconType"> 
	                            <span class="button"> 
	                                <span class="first-child"> 
	                                    <button type="button" onClick="usericon();">选择您喜欢的头像</button> 
	                                </span> 
	                            </span> 
	                            <span class="button" style="display:none"> 
	                                <span class="first-child"> 
	                                    <button  id="logoupload" type="button">上传</button> 
	                                </span>
	                            </span> 
	                            <input type="hidden" id="photo" name="photo" value="__PUBLIC__/images/head/b/{$headdata.filename}"> 
	                        </div> 
	                    </div> 
	                    <div class="inputWrap fl"> 
	                        <label >真实姓名:</label> 
	                        <input id="realname" name="realname" type="text" class="input" style="width:90px;" /> 
	                    </div> 
	                    <div class="inputWrap fl"> 
	                        <label >手机:</label> 
	                        <input id="phoneno" name="phoneno" type="text" class="input" style="width:90px;" /> 
	                    </div> 
	                    <div class="inputWrap fl"> 
	                        <label>性别:</label> 
	                        <select  name="sex" id="sex" class="select" style=" width:50px;"> 
	                        <option value=""></option> 
	                        <option value="0">先生</option> 
	                        <option value="1">女士</option> 
	                        </select> 
	                    </div> 
	                    <div class="inputWrap fl"> 
	                        <label>生日:</label> 
	                        <input id="birthday" name="birthday" type="text" class="input" style="width:90px;" onclick="WdatePicker();"/>
	                    </div> 
	                    
	                    <div class="cb"><span id="notetip"></span></div> 
	                </fieldset> 
	    
	    
	                <fieldset id="agreement"> 
	                    <legend class="text" >服务协议</legend> 
	                    <div id="agreementinfo"> 
	                        <div class="inputWrap"> 
	                            <label>保密协议:</label> 
	                            <div class="agreementContent"> 
	                                <iframe src="__APP__/User/privacy" scrolling="auto" frameborder="0" style="width:100%; height:100%"></iframe> 
	                            </div> 
	                        </div> 
	    
	                        <div class="inputWrap"> 
	                            <label>使用条款:</label> 
	                            <div class="agreementContent"> 
	                                <iframe src="__APP__/User/agreement" scrolling="auto" frameborder="0" style="width:100%; height:100%"></iframe> 
	                            </div> 
	                        </div> 
	                    </div> 
	                </fieldset> 
	    
	            </div> 
	        </div> 
	        </form>
    	</empty>      
    </div> 
    <!-- #register end --> 
    
    <!-- #footer --> 
    <include file="Public:footer" />
    <!-- #footer end --> 
 
</div> 



</body> 
</html>